package com.itheima.test3;

public class GamePlay {
    public static void main(String[] args) {
        // 乔峰
        Role r1 = new Role("慕容复", 100,"男");
        Role r2 = new Role("王语嫣", 100,"女");

        r1.showRoleInfo();
        System.out.println("====================");
        r2.showRoleInfo();
        System.out.println("====================");
        while (true) {
            r1.attack(r2);
            if (r2.getBlood() == 0) {
                System.out.println(r1.getName() + "K.O了" + r2.getName());
                break;
            }
            r2.attack(r1);
            if (r1.getBlood() == 0) {
                System.out.println(r2.getName() + "K.O了" + r1.getName());
                break;
            }

        }
    }
}
